#include <QApplication>
#include <QTranslator>
#include <QLocale>

#include "mainform.h"

MainForm *fp;

void myMessageOutput(QtMsgType type, const char *msg)
{
	fp->debugMessage(type, msg);
}

int main(int argc, char *argv[])
{
	QApplication a(argc, argv);

	QCoreApplication::setOrganizationName("DevProxy");
	QCoreApplication::setOrganizationDomain("devproxy.googlecode.com");
	QCoreApplication::setApplicationName("DevProxy");

	// translation
	QTranslator Translator;
	if ( Translator.load("devproxy." + QLocale::system().name()) )
		a.installTranslator(&Translator);
	
	MainForm f;
	fp = &f;
	qInstallMsgHandler( myMessageOutput );
	f.loadCodecs();
	f.show();
	int res = a.exec();
	qInstallMsgHandler(0);
	fp = 0;
	return res;
}

// kate: space-indent off; tab-indents on; indent-width 4; indent-mode cstyle;
